package es.udc.emarketapp.emarket.model.purchase.purchaseFacade.actions;

import java.sql.Connection;


import es.udc.emarketapp.emarket.model.orderLine.dao.SQLOrderLineDAO;
import es.udc.emarketapp.emarket.model.orderLine.dao.SQLOrderLineDAOFactory;
import es.udc.emarketapp.emarket.model.orderLine.vo.OrderLineVO;
import es.udc.fbellas.j2ee.util.exceptions.InstanceNotFoundException;
import es.udc.fbellas.j2ee.util.exceptions.InternalErrorException;
import es.udc.fbellas.j2ee.util.sql.TransactionalPlainAction;


public class ModifyOrderLineAction implements TransactionalPlainAction {

    private OrderLineVO orderLineVO;
    
    public ModifyOrderLineAction(OrderLineVO orderLineVO) {
        this.orderLineVO = orderLineVO;
    }
    
    public Object execute(Connection connection) 
        throws InternalErrorException, InstanceNotFoundException {        

        SQLOrderLineDAO orderLineDAO = SQLOrderLineDAOFactory.getDAO();

        orderLineDAO.update(connection, orderLineVO);  
        
        return null;

    }


}

